/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package midpmpc;

import javax.microedition.lcdui.Choice;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.List;

/**
 *
 * @author vvs
 */
public class MainMenu extends List{
    int isConnected=0;
    Command exitCmd;
    Command selectCmd;
    int M_CONN=0;
    int M_NP=1;
    int M_PB=2;
    int M_PL,M_LIB;
    public MainMenu(String title, int listType)
    {
        super("Main", Choice.IMPLICIT);
        
        M_CONN=append("connect", null);
        M_NP=append("now playing", null);
        M_PB=append("playback control",null);
        M_PL=append("playlist", null);
        M_LIB=append("library", null);

//        append("exit",null);
        exitCmd=new Command("exit", Command.EXIT, 0);
        selectCmd=new Command("ok", Command.OK, 0);
        addCommand(exitCmd);
        addCommand(selectCmd);

    }
    public void setConnected(int val)
    {
        delete(M_CONN);
        if (val == 1) {
            insert(M_CONN, "disconnect", null);
        } else {
            insert(M_CONN, "connect", null);
        }
    }


}
